package NewOOP;

public class Date {
    public int year;
    public int month;
    public int day;

    public void setDay(Date this,int year, int month, int day){
        this.year = year;
        this.month = month;
        this.day = day;
    }
    public void printDate(Date this){
        System.out.println(this.year + "/" + this.month + "/" + this.day);
    }
    public Date(int year,int month,int day){   //三个参数
        this.setDay(1900,2,2);
//        this.year = year;
//        this.month = month;
//        this.day = day;
        System.out.println("Date(int,int,int)方法被调用了");
    }


    public static void main(String[] args) {
        Date d = new Date(2023,9,11);
        d.printDate();
    }
}




